﻿using fenye.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace fenye.Controllers
{
    
    public class DefaultController : Controller
    {
        
        // GET: Default
        public ActionResult Index(int pagenum=1)
        {
            var context = new SchoolEntities();
            var course = context.Courses.OrderBy(x=>x.CourseID).Skip((pagenum - 1) * 5).Take(5).ToList();
            return View(course);
        }
    }
}